.class public Lcom/waiqin365/lightapp/im/domain/c;
.super Ljava/lang/Object;


# static fields
.field protected static final a:[Ljava/lang/String;

.field protected static final b:[Ljava/lang/String;

.field protected static c:I

.field protected static d:I

.field private static q:Lcom/waiqin365/lightapp/im/domain/c;


# instance fields
.field protected e:Landroid/app/NotificationManager;

.field protected f:Ljava/util/HashSet;

.field protected g:I

.field protected h:Landroid/content/Context;

.field protected i:Ljava/lang/String;

.field protected j:[Ljava/lang/String;

.field protected k:J

.field protected l:Landroid/media/AudioManager;

.field protected m:Landroid/os/Vibrator;

.field protected n:Lcom/waiqin365/lightapp/im/domain/g;

.field protected o:Ljava/util/List;

.field p:Landroid/media/Ringtone;


# direct methods
.method static constructor <clinit>()V
    .locals 8

    const/4 v7, 0x4

    const/4 v6, 0x3

    const/4 v5, 0x2

    const/4 v4, 0x1

    const/4 v3, 0x0

    const/4 v0, 0x7

    new-array v0, v0, [Ljava/lang/String;

    const-string/jumbo v1, "sent a message"

    aput-object v1, v0, v3

    const-string/jumbo v1, "sent a picture"

    aput-object v1, v0, v4

    const-string/jumbo v1, "sent a voice"

    aput-object v1, v0, v5

    const-string/jumbo v1, "sent location message"

    aput-object v1, v0, v6

    const-string/jumbo v1, "sent a video"

    aput-object v1, v0, v7

    const/4 v1, 0x5

    const-string/jumbo v2, "sent a file"

    aput-object v2, v0, v1

    const/4 v1, 0x6

    const-string/jumbo v2, "%1 contacts sent %2 messages"

    aput-object v2, v0, v1

    sput-object v0, Lcom/waiqin365/lightapp/im/domain/c;->a:[Ljava/lang/String;

    const/4 v0, 0x7

    new-array v0, v0, [Ljava/lang/String;

    const-string/jumbo v1, "\u53d1\u6765\u4e00\u6761\u6d88\u606f"

    aput-object v1, v0, v3

    const-string/jumbo v1, "\u53d1\u6765\u4e00\u5f20\u56fe\u7247"

    aput-object v1, v0, v4

    const-string/jumbo v1, "\u53d1\u6765\u4e00\u6bb5\u8bed\u97f3"

    aput-object v1, v0, v5

    const-string/jumbo v1, "\u53d1\u6765\u4f4d\u7f6e\u4fe1\u606f"

    aput-object v1, v0, v6

    const-string/jumbo v1, "\u53d1\u6765\u4e00\u4e2a\u89c6\u9891"

    aput-object v1, v0, v7

    const/4 v1, 0x5

    const-string/jumbo v2, "\u53d1\u6765\u4e00\u4e2a\u6587\u4ef6"

    aput-object v2, v0, v1

    const/4 v1, 0x6

    const-string/jumbo v2, "%1\u4e2a\u8054\u7cfb\u4eba\u53d1\u6765%2\u6761\u6d88\u606f"

    aput-object v2, v0, v1

    sput-object v0, Lcom/waiqin365/lightapp/im/domain/c;->b:[Ljava/lang/String;

    const/16 v0, 0x155

    sput v0, Lcom/waiqin365/lightapp/im/domain/c;->c:I

    const/16 v0, 0x16d

    sput v0, Lcom/waiqin365/lightapp/im/domain/c;->d:I

    const/4 v0, 0x0

    sput-object v0, Lcom/waiqin365/lightapp/im/domain/c;->q:Lcom/waiqin365/lightapp/im/domain/c;

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    const/4 v1, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->e:Landroid/app/NotificationManager;

    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->f:Ljava/util/HashSet;

    const/4 v0, 0x0

    iput v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->g:I

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    iput-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->p:Landroid/media/Ringtone;

    return-void
.end method

.method public static declared-synchronized a()Lcom/waiqin365/lightapp/im/domain/c;
    .locals 2

    const-class v1, Lcom/waiqin365/lightapp/im/domain/c;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/waiqin365/lightapp/im/domain/c;->q:Lcom/waiqin365/lightapp/im/domain/c;

    if-nez v0, :cond_0

    new-instance v0, Lcom/waiqin365/lightapp/im/domain/c;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/im/domain/c;-><init>()V

    sput-object v0, Lcom/waiqin365/lightapp/im/domain/c;->q:Lcom/waiqin365/lightapp/im/domain/c;

    :cond_0
    sget-object v0, Lcom/waiqin365/lightapp/im/domain/c;->q:Lcom/waiqin365/lightapp/im/domain/c;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v1

    return-object v0

    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method


# virtual methods
.method public a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/domain/c;
    .locals 2

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    const-string/jumbo v0, "notification"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->e:Landroid/app/NotificationManager;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v0

    iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->i:Ljava/lang/String;

    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "zh"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    sget-object v0, Lcom/waiqin365/lightapp/im/domain/c;->b:[Ljava/lang/String;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    const-string/jumbo v1, "audio"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/media/AudioManager;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->l:Landroid/media/AudioManager;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    const-string/jumbo v1, "vibrator"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/os/Vibrator;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->m:Landroid/os/Vibrator;

    new-instance v0, Lcom/waiqin365/lightapp/im/domain/f;

    invoke-direct {v0, p0}, Lcom/waiqin365/lightapp/im/domain/f;-><init>(Lcom/waiqin365/lightapp/im/domain/c;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    return-object p0

    :cond_0
    sget-object v0, Lcom/waiqin365/lightapp/im/domain/c;->a:[Ljava/lang/String;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    goto :goto_0
.end method

.method public declared-synchronized a(Lcom/hyphenate/chat/EMMessage;)V
    .locals 3

    const/4 v0, 0x0

    monitor-enter p0

    :try_start_0
    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/im/utils/l;->a()Ljava/util/List;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    if-eqz p1, :cond_2

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_2

    :goto_0
    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge v0, v1, :cond_2

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getTo()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v1, v2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v1

    if-eqz v1, :cond_1

    :cond_0
    :goto_1
    monitor-exit p0

    return-void

    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_2
    :try_start_1
    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/hyphenate/chat/EMChatManager;->isSilentMessage(Lcom/hyphenate/chat/EMMessage;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->getCurrentUser()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {}, Lcom/waiqin365/lightapp/im/b;->a()Lcom/waiqin365/lightapp/im/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/b;->d()Lcom/waiqin365/lightapp/im/d;

    move-result-object v0

    invoke-interface {v0, p1}, Lcom/waiqin365/lightapp/im/d;->a(Lcom/hyphenate/chat/EMMessage;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-static {v0}, Lcom/hyphenate/util/EasyUtils;->isAppRunningForeground(Landroid/content/Context;)Z

    move-result v0

    if-nez v0, :cond_3

    const-string/jumbo v0, "notify"

    const-string/jumbo v1, "app is running in backgroud"

    invoke-static {v0, v1}, Lcom/hyphenate/util/EMLog;->d(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lcom/waiqin365/lightapp/im/domain/c;->a(Lcom/hyphenate/chat/EMMessage;Z)V

    :goto_2
    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/im/domain/c;->b(Lcom/hyphenate/chat/EMMessage;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_1

    :catch_0
    move-exception v0

    :try_start_2
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_1

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0

    :cond_3
    const/4 v0, 0x1

    :try_start_3
    invoke-virtual {p0, p1, v0}, Lcom/waiqin365/lightapp/im/domain/c;->a(Lcom/hyphenate/chat/EMMessage;Z)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    goto :goto_2
.end method

.method protected a(Lcom/hyphenate/chat/EMMessage;Z)V
    .locals 1

    const/4 v0, 0x1

    invoke-virtual {p0, p1, p2, v0}, Lcom/waiqin365/lightapp/im/domain/c;->a(Lcom/hyphenate/chat/EMMessage;ZZ)V

    return-void
.end method

.method protected a(Lcom/hyphenate/chat/EMMessage;ZZ)V
    .locals 8

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v0

    :try_start_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    sget-object v0, Lcom/waiqin365/lightapp/im/domain/e;->a:[I

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Type;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/pm/PackageManager;->getApplicationLabel(Landroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    if-eqz v1, :cond_6

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    invoke-interface {v1, p1}, Lcom/waiqin365/lightapp/im/domain/g;->a(Lcom/hyphenate/chat/EMMessage;)Ljava/lang/String;

    move-result-object v3

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    invoke-interface {v1, p1}, Lcom/waiqin365/lightapp/im/domain/g;->b(Lcom/hyphenate/chat/EMMessage;)Ljava/lang/String;

    move-result-object v1

    if-eqz v3, :cond_0

    move-object v2, v3

    :cond_0
    if-eqz v1, :cond_6

    move-object v3, v2

    move-object v2, v1

    :goto_1
    new-instance v0, Landroid/support/v4/app/NotificationCompat$Builder;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/support/v4/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f020450

    invoke-virtual {v0, v1}, Landroid/support/v4/app/NotificationCompat$Builder;->setSmallIcon(I)Landroid/support/v4/app/NotificationCompat$Builder;

    move-result-object v0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-virtual {v0, v4, v5}, Landroid/support/v4/app/NotificationCompat$Builder;->setWhen(J)Landroid/support/v4/app/NotificationCompat$Builder;

    move-result-object v0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/support/v4/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroid/support/v4/app/NotificationCompat$Builder;

    move-result-object v4

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->i:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/content/pm/PackageManager;->getLaunchIntentForPackage(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    if-eqz v1, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    invoke-interface {v0, p1}, Lcom/waiqin365/lightapp/im/domain/g;->d(Lcom/hyphenate/chat/EMMessage;)Landroid/content/Intent;

    move-result-object v0

    :cond_1
    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    sget v5, Lcom/waiqin365/lightapp/im/domain/c;->c:I

    const/high16 v6, 0x8000000

    invoke-static {v1, v5, v0, v6}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v5

    if-eqz p3, :cond_2

    if-nez p2, :cond_2

    iget v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->g:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->g:I

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->f:Ljava/util/HashSet;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->f:Ljava/util/HashSet;

    invoke-virtual {v0}, Ljava/util/HashSet;->size()I

    move-result v1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    const/4 v6, 0x6

    aget-object v0, v0, v6

    const-string/jumbo v6, "%1"

    invoke-static {v1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v0, v6, v7}, Ljava/lang/String;->replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v6, "%2"

    iget v7, p0, Lcom/waiqin365/lightapp/im/domain/c;->g:I

    invoke-static {v7}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v0, v6, v7}, Ljava/lang/String;->replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iget-object v6, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    if-eqz v6, :cond_4

    iget-object v6, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    iget v7, p0, Lcom/waiqin365/lightapp/im/domain/c;->g:I

    invoke-interface {v6, p1, v1, v7}, Lcom/waiqin365/lightapp/im/domain/g;->a(Lcom/hyphenate/chat/EMMessage;II)Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_3

    move-object v0, v1

    :cond_3
    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->n:Lcom/waiqin365/lightapp/im/domain/g;

    invoke-interface {v1, p1}, Lcom/waiqin365/lightapp/im/domain/g;->c(Lcom/hyphenate/chat/EMMessage;)I

    move-result v1

    if-eqz v1, :cond_4

    invoke-virtual {v4, v1}, Landroid/support/v4/app/NotificationCompat$Builder;->setSmallIcon(I)Landroid/support/v4/app/NotificationCompat$Builder;

    :cond_4
    invoke-virtual {v4, v2}, Landroid/support/v4/app/NotificationCompat$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/support/v4/app/NotificationCompat$Builder;

    invoke-virtual {v4, v3}, Landroid/support/v4/app/NotificationCompat$Builder;->setTicker(Ljava/lang/CharSequence;)Landroid/support/v4/app/NotificationCompat$Builder;

    invoke-virtual {v4, v0}, Landroid/support/v4/app/NotificationCompat$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/support/v4/app/NotificationCompat$Builder;

    invoke-virtual {v4, v5}, Landroid/support/v4/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/support/v4/app/NotificationCompat$Builder;

    invoke-virtual {v4}, Landroid/support/v4/app/NotificationCompat$Builder;->build()Landroid/app/Notification;

    move-result-object v0

    if-eqz p2, :cond_5

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->e:Landroid/app/NotificationManager;

    sget v2, Lcom/waiqin365/lightapp/im/domain/c;->d:I

    invoke-virtual {v1, v2, v0}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->e:Landroid/app/NotificationManager;

    sget v1, Lcom/waiqin365/lightapp/im/domain/c;->d:I

    invoke-virtual {v0, v1}, Landroid/app/NotificationManager;->cancel(I)V

    :goto_2
    return-void

    :pswitch_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    const/4 v2, 0x0

    aget-object v1, v1, v2

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto/16 :goto_0

    :pswitch_1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    const/4 v2, 0x1

    aget-object v1, v1, v2

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto/16 :goto_0

    :pswitch_2
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    const/4 v2, 0x2

    aget-object v1, v1, v2

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto/16 :goto_0

    :pswitch_3
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    const/4 v2, 0x3

    aget-object v1, v1, v2

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto/16 :goto_0

    :pswitch_4
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    const/4 v2, 0x4

    aget-object v1, v1, v2

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto/16 :goto_0

    :pswitch_5
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->j:[Ljava/lang/String;

    const/4 v2, 0x5

    aget-object v1, v1, v2

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto/16 :goto_0

    :cond_5
    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->e:Landroid/app/NotificationManager;

    sget v2, Lcom/waiqin365/lightapp/im/domain/c;->c:I

    invoke-virtual {v1, v2, v0}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_2

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto/16 :goto_2

    :cond_6
    move-object v3, v2

    move-object v2, v0

    goto/16 :goto_1

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
    .end packed-switch
.end method

.method public a(Ljava/util/List;)V
    .locals 1

    if-nez p1, :cond_0

    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/waiqin365/lightapp/im/utils/l;->a(Ljava/util/List;)V

    return-void
.end method

.method public b()Ljava/util/List;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v0

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/utils/l;->a()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->o:Ljava/util/List;

    return-object v0
.end method

.method public b(Lcom/hyphenate/chat/EMMessage;)V
    .locals 4

    if-eqz p1, :cond_1

    :try_start_0
    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/hyphenate/chat/EMChatManager;->isSilentMessage(Lcom/hyphenate/chat/EMMessage;)Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iget-wide v2, p0, Lcom/waiqin365/lightapp/im/domain/c;->k:J

    sub-long/2addr v0, v2

    const-wide/16 v2, 0x3e8

    cmp-long v0, v0, v2

    if-ltz v0, :cond_0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->k:J

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->l:Landroid/media/AudioManager;

    invoke-virtual {v0}, Landroid/media/AudioManager;->getRingerMode()I

    move-result v0

    if-nez v0, :cond_2

    const-string/jumbo v0, "notify"

    const-string/jumbo v1, "in slient mode now"

    invoke-static {v0, v1}, Lcom/hyphenate/util/EMLog;->e(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    :cond_2
    :try_start_1
    invoke-static {}, Lcom/waiqin365/lightapp/im/b;->a()Lcom/waiqin365/lightapp/im/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/b;->d()Lcom/waiqin365/lightapp/im/d;

    move-result-object v0

    invoke-interface {v0, p1}, Lcom/waiqin365/lightapp/im/d;->c(Lcom/hyphenate/chat/EMMessage;)Z

    move-result v1

    if-eqz v1, :cond_3

    const/4 v1, 0x4

    new-array v1, v1, [J

    fill-array-data v1, :array_0

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/domain/c;->m:Landroid/os/Vibrator;

    const/4 v3, -0x1

    invoke-virtual {v2, v1, v3}, Landroid/os/Vibrator;->vibrate([JI)V

    :cond_3
    invoke-interface {v0, p1}, Lcom/waiqin365/lightapp/im/d;->b(Lcom/hyphenate/chat/EMMessage;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->p:Landroid/media/Ringtone;

    if-nez v0, :cond_4

    const/4 v0, 0x2

    invoke-static {v0}, Landroid/media/RingtoneManager;->getDefaultUri(I)Landroid/net/Uri;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->h:Landroid/content/Context;

    invoke-static {v1, v0}, Landroid/media/RingtoneManager;->getRingtone(Landroid/content/Context;Landroid/net/Uri;)Landroid/media/Ringtone;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->p:Landroid/media/Ringtone;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->p:Landroid/media/Ringtone;

    if-nez v1, :cond_4

    const-string/jumbo v1, "notify"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v3, "cant find ringtone at:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v0}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/hyphenate/util/EMLog;->d(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    :cond_4
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/domain/c;->p:Landroid/media/Ringtone;

    invoke-virtual {v0}, Landroid/media/Ringtone;->isPlaying()Z

    move-result v0

    if-nez v0, :cond_0

    sget-object v0, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/domain/c;->p:Landroid/media/Ringtone;

    invoke-virtual {v1}, Landroid/media/Ringtone;->play()V

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "samsung"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v0, Lcom/waiqin365/lightapp/im/domain/d;

    invoke-direct {v0, p0}, Lcom/waiqin365/lightapp/im/domain/d;-><init>(Lcom/waiqin365/lightapp/im/domain/c;)V

    invoke-virtual {v0}, Ljava/lang/Thread;->run()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto/16 :goto_0

    nop

    :array_0
    .array-data 8
        0x0
        0xb4
        0x50
        0x78
    .end array-data
.end method

.method public c()V
    .locals 1

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/domain/c;->b(Lcom/hyphenate/chat/EMMessage;)V

    return-void
.end method
